<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Schedule Generation</title>
		<script type="text/javascript"> 
			function getinfo(){
				var mylist=document.getElementById("sub_info") 
				var val = mylist.options[mylist.selectedIndex].value
				var mylist2=document.getElementById("info") 
				var val2 = mylist2.options[mylist2.selectedIndex].value
				if(val2 == "a"){
					mylist.options.length=0
					mylist.options[0]=new Option("_____", "sportsvalue", true, false)
				}else if (val2 == "b"){
					mylist.options.length=0
					mylist.options[0]=new Option("Normal", "sportsvalue", true, false)
					mylist.options[1]=new Option("Nightmare", "musicvalue", false, false)
					mylist.options[2]=new Option("Hell", "moviesvalue", false, false)
				}else{
					mylist.options.length=0
					mylist.options[0]=new Option("Beginner", "sportsvalue", true, false)
					mylist.options[1]=new Option("Intermediate", "musicvalue", false, false)
					mylist.options[2]=new Option("Advanced", "moviesvalue", false, false)
				}
			}
			function generate(){
				var mylist=document.getElementById("info") 
				var gametype = mylist.options[mylist.selectedIndex].text
				var mylist2=document.getElementById("sub_info") 
				var gamelevel = mylist2.options[mylist2.selectedIndex].text
				if(gametype != "Choose game" ){
					alert('Generating schedule for ' + gametype + ' - '  + gamelevel)
				}else{
					alert("Please choose again")
				}
			}
		</script>
	</head>
	<body>
		<?php include '../view/admin_header.php';?>
		<div style="clear: both;"></div>
		<div class="mainbox" align="center">
			<p align="center">** Home **
				<?php demo() ?>
			</p>
			<form action="" method="post" id="fomu">
				<select id="info" name="gametype" onchange="getinfo()">
					<option title="a">Choose game</option>
					<option title="b">Basketball</option>
					<option title="c">Soccer</option>
				</select> <select id="sub_info" name="gamelevel">
					<option>_____</option>
				</select> <input type="button" value="Generate Schedule" onClick="generate()" />
			</form>
		</div>
	</body>
</html>